﻿using System;

using System.Collections.Generic;
using System.Text;

namespace Silvermoon.Animations
{
    public class IntAnimation : Animation<int>
    {
        public const int DefaultDuration = 475;

        public IntAnimation()
            : base()
        {
        }

        public IntAnimation(int duration, int startValue, int endValue, int startDelay)
            : this()
        {
            From = startValue;
            To = endValue;
            Duration = duration;
            StartDelay = startDelay;
        }

        protected override int CalculateValue(float value)
        {
            return (int)((To - From) * value) + From;
        }
    }
}
